<?php
class RSITE_View_Helpers_Logado extends Zend_View_Helper_Abstract
{
    public function logado ()
    {
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            $usuario = $auth->getIdentity()->login;
            $logoutUrl = $this->view->url(array('module' => 'default', 'controller' => 'autenticacao','action' => 'logout'));            
            return $usuario."&nbsp<div id='txt-logout'><a title='Sair' href='".$logoutUrl ."'><img align='left' border=0 src='/imagens/icon_sair.png'></img></div></a>";
            //'Usuário: </br><strong>'.$usuario .'</strong> </br><a class="txt-logout" title="Sair" href="'.$logoutUrl . '">Sair</a>';            
        }
    }
}